import { ApiProperty } from '@nestjs/swagger';
import { User } from '../../user/entities/user.entity';

export class CreateMenuDto {
  @ApiProperty({ type: String, description: '菜单名' })
  name: string;
  @ApiProperty({ type: String, description: '菜单图标' })
  icon: string;
  @ApiProperty({
    type: Number,
    description: '菜单图标 0-false 1-true',
    default: 1,
  })
  iconSvg: number;
  @ApiProperty({ type: String, description: '菜单名' })
  title: string;
  @ApiProperty({ type: String, description: '菜单类型 A-目录 B-菜单 C-按钮' })
  type: string;
  @ApiProperty({ type: String, description: '菜单组件路径' })
  component: string;
  @ApiProperty({
    type: String,
    description: '菜单路由路径',
  })
  routePath: string;
  @ApiProperty({ type: String, description: '菜单权限标识' })
  permissions: string;
  @ApiProperty({
    type: Number,
    description: '菜单tab中固定 0-false 1-true',
    default: 0,
  })
  fixed: number;
  @ApiProperty({
    type: Number,
    description: '菜单是否开启 0-false 1-true',
    default: 1,
  })
  keepalive: number;
  @ApiProperty({ type: Number, description: '菜单排序规则', default: 0 })
  sort: number;
  @ApiProperty({
    type: Number,
    description: '菜单是否隐藏 0-false 1-true',
    default: 0,
  })
  isHidden: number;
  @ApiProperty({ type: String, description: '父级ID', required: false })
  parentId: string;
  @ApiProperty({ type: String, description: '路由重定向' })
  redirect: string;
  user: User;
}
